package com.youlu.campus.wechat.enums;

import com.wechat.pay.java.core.http.HttpMethod;
import org.apache.commons.lang3.ArrayUtils;

/**
 * 微信商户投诉 相关api接口
 *
 * @Description: WechatComplaintConstant
 * @Date 2025/6/18
 * @author: su
 */
public enum WechatPayRefundApiEnum {

    //微信支付
    PAY_REFUND_V2(getHttpsPath() + "secapi/pay/refund", HttpMethod.POST, "微信支付退款接口V2版"),

    ;


    private static final String HTTPS_PATH = "https://api.mch.weixin.qq.com";

    private static String getHttpsPath() {
        return HTTPS_PATH;
    }


    private String url;

    private HttpMethod method;

    private String desc;

    WechatPayRefundApiEnum(String url, HttpMethod method, String desc) {
        this.url = url;
        this.method = method;
        this.desc = desc;
    }

    public String getUrl(String... pathParams) {
        if (ArrayUtils.isEmpty(pathParams)) {
            return this.url;
        }
        return String.format(this.url, pathParams);
    }

    public HttpMethod getMethod() {
        return method;
    }

    public String getDesc() {
        return desc;
    }
}
